'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  // 中间件挂载 以及 路由页面的解构
  const { router, controller } = app;
  // const token = app.middleware.token({ threshold: 1024 });

  // 登录页
  router.post('/api/login', controller.login.login);
  router.post('/api/sign', controller.login.signIn);

  // 首页
  router.post('/api/list', controller.home.list);
  router.post('/api/shopping', controller.home.shopping);
  router.post('/api/shopList', controller.home.shopList);
};
